package ru.papergames.web.controllers;

import ru.papergames.common.form.PcPlayerForm;
import ru.papergames.web.AppConstants;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * @author Alexander Troshanin
 */
public abstract class AbstractController {

    public boolean checkAuth(HttpServletRequest request, HttpServletResponse response) throws Exception {
        return true;
    }

    protected PcPlayerForm getPcPlayerForm(HttpServletRequest request) {
        return (PcPlayerForm) request.getSession().getAttribute(AppConstants.SESSION_USER);
    }

}
